program List3;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  pelement = ^element;
  element = record
    value: integer;
    next: pelement;
  end;

var
  head: pelement;
  fin: textFile;
  n, i, num: integer;

procedure Add (var head: pelement; num: integer);
  var tmp: pelement;
  begin
    tmp:= head;
    new (head);
    head^.next:= tmp;
    head^.value:= num;
  end;

procedure AddToEnd (var head: pelement; num: integer);
  var current: pelement;
  begin
    if (head <> nil) then
    begin
      current:=head;
      while (current^.next<>nil) do
        current:=current^.next;
      new (current^.next);
      current^.next^.value:= num;
      current^.next^.next:=nil
    end else begin
      Add (head, num);
    end;
  end;

procedure PrintList (head: pelement);
  var current: pelement;
  begin
    current:= head;
    while (current<>nil) do
    begin
      writeln (current^.value);
      current:= current^.next;
    end;
  end;

function Delete (var head: pelement): integer;
  var tmp: pelement;
  begin
    tmp:= head^.next;
    Delete:= head^.value;
    dispose (head);
    head:= tmp;
  end;


procedure Delete2 (var head: pelement);
  var current: pelement; k: integer;
  begin
    k:=0;
    if (head <> nil) then
    begin
      current:=head;
      while (current <> nil) do
      begin
        if (current^.value mod 2 = 0) then
        begin
          //writeln (current^.value);
          Delete (current);
          //writeln (current^.value);
        end else begin
          k:=k+1;
          writeln (current^.value+k);
          current:= current^.next;
        end;
      end;
    end;
  end;



procedure Plus1 (head: pelement);
  var current: pelement;
  begin
    current:= head;
    while (current<>nil) do
    begin
      current^.value:=current^.value+1;
      current:= current^.next;
    end;
  end;


begin
  assignFile (fin, 'input.txt');
  reset (fin);
  readln (fin, n);
  for i:= 1 to n do
    begin
      readln (fin, num);
      AddToEnd (head, num);
    end;
  printlist (head);
  writeln;
  delete2 (head);
  //printlist (head);
  //plus1 (head);
  //printlist (head);
  closeFile(fin);
  readln;
end.
